<template lang="html">
  <div class="badge-container">
    <as-header title="Badge">
      <router-link to="/" slot="left" class="link">
        <span class="iconfont icon-zuosanjiao"></span>
      </router-link>
    </as-header>
    <br>
    <as-cell title="基础小红点">
      <p slot="right"><as-badge></as-badge></p>
    </as-cell>
    <as-cell title="有数值">
      <p slot="right"><as-badge :value="3"></as-badge></p>
    </as-cell>
    <as-cell title="数值过多时收纳">
      <p slot="right"><as-badge :value="190" :limit="99"></as-badge></p>
    </as-cell>
    <as-cell title="显示字符">
      <p slot="right"><as-badge value="NEW"></as-badge></p>
    </as-cell>
    <as-cell title="带描边">
      <p slot="right" class="border-example"><as-badge value="1" border></as-badge></p>
    </as-cell>
  </div>
</template>

<script>
export default {
  name: 'Tabbar',
  data() {
    return {
      selectedTabId: 'tab1',
      value1: true
    }
  },
  methods: {
    update1(val) {
      this.value1 = val
    }
  }
}
</script>

<style lang="scss">
.badge-container{
  position: relative;

  .border-example {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100px;
    background-color: #C60A1E;
  }
}
</style>
